#include<iostream>
using namespace std;
typedef long long LL;
const LL MOD = 1e11 + 3;
int main()
{
	int n;
	cin >> n;
	LL sum = 0;
	LL a = 1;
    LL b = 3;
	LL ans = 0;
	sum = a + b;
	if (n == 1) {
		cout << 1 << endl;
		return 0;
	}
	if (n == 2) {
		cout << 3 << endl;
		return 0;
	}
	if (n == 3) {
		cout << sum << endl;
		return 0;
	}
	for (int i = 3; i <= n; i++) {
		ans = a % MOD + b % MOD;
		sum += ans;
		sum %= MOD;
		ans %= MOD;
		a = b;
		b = ans;
		//cout << sum << " ";
	}
	cout << sum << endl;
	return 0;
}